package com.dsjy.yf.address.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dsjy.yf.address.entity.dataobject.YardRoadDO;

import java.util.List;

/**
 * @author whj
 * @version 1.0
 * @date 2021-01-20 9:15
 */
public interface YardRoadService {

    /**
     * 根据院落id查找院内道路对象
     *
     * @param parentCode
     * @return
     */
    List<YardRoadDO> searchYardRoadWithParentCode(Integer parentCode, Boolean flag);

    /**
     * 增删改
     *
     * @param operate
     * @param yardRoadDO
     * @return
     */
    Integer addUpdDel(String operate, YardRoadDO yardRoadDO);

    /**
     * 增加院落内道路
     *
     * @param yardRoadDO
     * @return
     */
    Integer addYardRoad(YardRoadDO yardRoadDO);

    /**
     * 删除
     *
     * @param id
     * @return
     */
    Integer delYardRoad(Integer id);

    /**
     * 通过yard_id删除数据
     *
     * @param parentCode
     * @return
     */
    Integer delYardRoadByParentCode(Integer parentCode);

    /**
     * 修改更新
     *
     * @param yardRoadDO
     * @return
     */
    Integer updYarRoad(YardRoadDO yardRoadDO);

    /**
     * 分页查询
     *
     * @param pageNum
     * @param pageSize
     * @param wrapper
     * @return
     */
    IPage searchWithPage(Integer pageNum, Integer pageSize, QueryWrapper wrapper);
}
